<?php
/* @var $this MstTypeContentController */
/* @var $model MstTypeContent */


$this->breadcrumbs=array(
	'Mst Type Contents'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List MstTypeContent', 'url'=>array('index')),
	array('label'=>'Create MstTypeContent', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#mst-type-content-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Master</h1>
<a href="<?php echo Yii::app()->createUrl('mstTypeContent/create'); ?>" class="btn btn-sm btn-primary">Add New Master</a><br /><br />

<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button btn')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('bootstrap.widgets.TbGridView',array(
	'id'=>'mst-type-content-grid',
	'dataProvider'=>$model->search(),
	//'filter'=>$model,
	'columns'=>array(
		'id',
		array(
			'name'=>'type_id',
			'value'=>'MstType::model()->findByPk($data->type_id)->name',
		),
		'name',
		array(
			'class'=>'bootstrap.widgets.TbButtonColumn',
		),
	),
)); ?>